﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using compshop.Infrastructure;
using compshop.Modules.OrdersToSupplier.Views;

namespace compshop.Modules.OrdersToSupplier
{
    public class OrdersToSupplierModule: IModule
    {
        private readonly IUnityContainer _container;
        IRegionManager _regionManager;

        public OrdersToSupplierModule(IUnityContainer container, IRegionManager regionManager)
        {
            _container = container;
            _regionManager = regionManager;
        }

        public void Initialize()
        {
            _regionManager.Regions[RegionNames.OrdersToSupplierContent].Add(_container.Resolve<OrdersToSupplierView>());
        }
    }
}
